<?php
session_start(); 
if(!isset($_SESSION['userName'])){
header( 'location:../index.php' ); 
}
	include("../conf/connect.php");
	$user_id = $_SESSION['user_id'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title></title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" type="text/css" href="../style.css" media="screen" />
	<link rel="shortcut icon" href="images/favicon.ico" />
</head>
<body class="iub_back">
	<form method="post" action="sedit.php?qus=ret">
	<table align="center" class="table_border">
			<tr>
					<td class="header"><b class="htext">IUB Survey :: </b><br /><hr /> </td>
			</tr>
						
			<?php
				$sql ="SELECT * FROM raw_data where user_id='$user_id'";
				$result=mysql_query( $sql);
				$data;
				$i=0;
				$j=0;
				$k=0;
				$hhhid;
				while($row = mysql_fetch_array($result)){
					if($k==0){
						$hhhid[$i]=$row['hid'];
						$k++;
					}
					else{
						if($hhhid[$i]!=$row['hid']){
							$i++;
							$j=0;
							$hhhid[$i]=$row['hid'];
							$k++;
						}
						
					}
					$data[$i][$j++]=$row;
				
				}			?>
			<tr>
					<td valign="top">HH ID : </td>
			</tr>
			<tr>
					<td valign="top"> 
							
							<select name="HHHid">
							<?php
								for($i=0;$i<$k;$i++){
							?>
									<option value="<?php echo $hhhid[$i];?>"><?php echo $hhhid[$i];?></option>
							<?php
								}
							?>
							</select>
					</td>
			</tr>
			<tr>
					<td align="right"><input type="submit" value="Submit" class="input-box" /></td>
			</tr>			
		</table>
		</form>
</body>
</html>